.class Lcom/waiqin365/compons/camera/b;
.super Ljava/lang/Thread;


# instance fields
.field final synthetic a:Ljava/util/ArrayList;

.field final synthetic b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/compons/camera/CameraAlbumActivity;Ljava/util/ArrayList;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    iput-object p2, p0, Lcom/waiqin365/compons/camera/b;->a:Ljava/util/ArrayList;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    const-string/jumbo v1, ""

    const/4 v0, 0x0

    move v2, v0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v0}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->c(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v2, v0, :cond_3

    iget-object v3, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    iget-object v0, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v0}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->c(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {v3, v0}, Lcom/waiqin365/compons/camera/b/b;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    if-eqz v3, :cond_0

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    new-instance v1, Ljava/text/SimpleDateFormat;

    const-string/jumbo v4, "yyyyMMddHHmmssSSS"

    invoke-direct {v1, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v4

    invoke-virtual {v4}, Ljava/util/Calendar;->getTime()Ljava/util/Date;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    iget-object v4, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v4}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->j(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v4, "_"

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v4

    invoke-virtual {v4}, Lcom/fiberhome/gaea/client/c/b;->m()Ljava/lang/String;

    move-result-object v4

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v5

    invoke-virtual {v5}, Lcom/fiberhome/gaea/client/c/b;->m()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    add-int/lit8 v5, v5, -0x8

    invoke-virtual {v4, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v4, "_ALBUM"

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v4, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v4, v3}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->a(Lcom/waiqin365/compons/camera/CameraAlbumActivity;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v1}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->k(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)I

    move-result v1

    if-nez v1, :cond_1

    invoke-static {v3, v0}, Lcom/fiberhome/gaea/client/d/c;->e(Ljava/lang/String;Ljava/lang/String;)V

    move-object v1, v0

    :cond_0
    :goto_1
    new-instance v3, Lcom/waiqin365/compons/camera/a/a;

    invoke-direct {v3}, Lcom/waiqin365/compons/camera/a/a;-><init>()V

    iget-object v0, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v0}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->c(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    iput-object v0, v3, Lcom/waiqin365/compons/camera/a/a;->a:Ljava/lang/String;

    iput-object v1, v3, Lcom/waiqin365/compons/camera/a/a;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/compons/camera/b;->a:Ljava/util/ArrayList;

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto/16 :goto_0

    :cond_1
    iget-object v1, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v1}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->k(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)I

    move-result v1

    const/4 v4, 0x1

    invoke-static {v3, v1, v0, v4}, Lcom/waiqin365/compons/camera/b/a;->a(Ljava/lang/String;ILjava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_2

    invoke-static {v3, v0}, Lcom/fiberhome/gaea/client/d/c;->e(Ljava/lang/String;Ljava/lang/String;)V

    :cond_2
    move-object v1, v0

    goto :goto_1

    :cond_3
    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    const/16 v1, 0x7d0

    iput v1, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcom/waiqin365/compons/camera/b;->a:Ljava/util/ArrayList;

    iput-object v1, v0, Landroid/os/Message;->obj:Ljava/lang/Object;

    iget-object v1, p0, Lcom/waiqin365/compons/camera/b;->b:Lcom/waiqin365/compons/camera/CameraAlbumActivity;

    invoke-static {v1}, Lcom/waiqin365/compons/camera/CameraAlbumActivity;->l(Lcom/waiqin365/compons/camera/CameraAlbumActivity;)Landroid/os/Handler;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method
